.NET Framework Class Library |
ConcurrentQueue<(Of <(T>)>)..::.IsEmpty Property |
ConcurrentQueue<(Of <(T>)>) Class See Also Send Feedback |
Gets a value that indicates whether the ConcurrentQueue<(Of <(T>)>) is empty.
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public ReadOnly Property IsEmpty As Boolean |
C# |
---|
public bool IsEmpty { get; } |
Field Value
true if the ConcurrentQueue<(Of <(T>)>) is empty; otherwise, false.Remarks
For determining whether the collection contains any items, use of this property is recommended
rather than retrieving the number of items from the Count property and comparing it
to 0. However, as this collection is intended to be accessed concurrently, it may be the case
that another thread will modify the collection after IsEmpty returns, thus invalidating
the result.